import {createBrowserRouter,Navigate} from 'react-router-dom'

import Home from '../component/Home'
import List from '../component/List'
import Child from '../component/Child'

const router = createBrowserRouter([
   {
      path:'/',
      element:<Home/>
   },
   {
      path:'/list',
      element:<List/>
   },
   {
      path:'/child',
      element:<Child/>
   },
   {
      path:'/',
      element:<Navigate to="/"/>
   }
])
export default router
